Skip to main content

Creating EMaC Policy Import Schedulers

Overview

This page covers the Cloud Scheduler setup for the EMaC Policy Import.

For a full operator walkthrough, see Running an EMaC Policy Import End to End.

Preparation

  1. Bucket name is biddirect-2.appspot.com and this may vary across environments.
  2. Both files should be uploaded to imports/fileDrop/ before starting the import.

Validation

Validation can be run separately if required, but it is not part of the import order. When an import scheduler is run, validation is performed as part of that import.

Fleet File Validation

  1. Go to Cloud Scheduler and select CREATE JOB.

Setup

A scheduler should be created with the following parameters.

  • Name: emac_customer_contract_fleet_file_validation
  • Region: europe-west2
  • Frequency: 0 0 31 12 1
  • TimeZone: GMT London
  • Target type: HTTP
  • URL: https://import-manager-36r2bu4izq-uc.a.run.app/policy-import
  • HTTP method: POST
  • Auth header: select OIDC token
  • Service account: cloud-run-import-customer-contract
  • Body: a JSON object including the following parameters

JSON object for fleet validation scheduler

{
"leaseId": "<leaseId>",
"persist": "false",
"bucket": "biddirect-2.appspot.com",
"appDirectory": "/usr/src/app/",
"importPath": "imports/fileDrop/",
"importFileDropPath": "imports/fileDrop/",
"importFileName": "emacFleetFile.csv",
"email": "mailgun@digitalinnk.com",
"fatalErrorEmailToAddress": "mailgun@digitalinnk.com",
"schema": "EMAC_CUSTOMER_CONTRACT_FLEET_FILE"
}

Fleet File Import

  1. Go to Cloud Scheduler and select CREATE JOB.

Setup

A scheduler should be created with the following parameters.

  • Name: emac_customer_contract_fleet_file_import
  • Region: europe-west2
  • Frequency: 0 0 31 12 1
  • TimeZone: GMT London
  • Target type: HTTP
  • URL: https://import-manager-36r2bu4izq-uc.a.run.app/policy-import
  • HTTP method: POST
  • Auth header: select OIDC token
  • Service account: cloud-run-import-customer-contract
  • Body: a JSON object including the following parameters

JSON object for fleet import scheduler

{
"leaseId": "<leaseId>",
"persist": "true",
"bucket": "biddirect-2.appspot.com",
"appDirectory": "/usr/src/app/",
"importPath": "imports/fileDrop/",
"importFileDropPath": "imports/fileDrop/",
"importFileName": "emacFleetFile.csv",
"email": "mailgun@digitalinnk.com",
"fatalErrorEmailToAddress": "mailgun@digitalinnk.com",
"schema": "EMAC_CUSTOMER_CONTRACT_FLEET_FILE"
}

Benefits File Validation

  1. Go to Cloud Scheduler and select CREATE JOB.

Setup

A scheduler should be created with the following parameters.

  • Name: emac_customer_contract_benefits_file_validation
  • Region: europe-west2
  • Frequency: 0 0 31 12 1
  • TimeZone: GMT London
  • Target type: HTTP
  • URL: https://import-manager-36r2bu4izq-uc.a.run.app/policy-import
  • HTTP method: POST
  • Auth header: select OIDC token
  • Service account: cloud-run-import-customer-contract
  • Body: a JSON object including the following parameters

JSON object for benefits validation scheduler

{
"leaseId": "<leaseId>",
"persist": "false",
"bucket": "biddirect-2.appspot.com",
"appDirectory": "/usr/src/app/",
"importPath": "imports/fileDrop/",
"importFileDropPath": "imports/fileDrop/",
"importFileName": "emacBenefitsFile.csv",
"email": "mailgun@digitalinnk.com",
"fatalErrorEmailToAddress": "mailgun@digitalinnk.com",
"schema": "EMAC_CUSTOMER_CONTRACT_BENEFITS_FILE"
}

Benefits File Import

  1. Go to Cloud Scheduler and select CREATE JOB.

Setup

A scheduler should be created with the following parameters.

  • Name: emac_customer_contract_benefits_file_import
  • Region: europe-west2
  • Frequency: 0 0 31 12 1
  • TimeZone: GMT London
  • Target type: HTTP
  • URL: https://import-manager-36r2bu4izq-uc.a.run.app/policy-import
  • HTTP method: POST
  • Auth header: select OIDC token
  • Service account: cloud-run-import-customer-contract
  • Body: a JSON object including the following parameters

JSON object for benefits import scheduler

{
"leaseId": "<leaseId>",
"persist": "true",
"bucket": "biddirect-2.appspot.com",
"appDirectory": "/usr/src/app/",
"importPath": "imports/fileDrop/",
"importFileDropPath": "imports/fileDrop/",
"importFileName": "emacBenefitsFile.csv",
"email": "mailgun@digitalinnk.com",
"reimportAll": "false",
"shouldTerminate": "false",
"fatalErrorEmailToAddress": "mailgun@digitalinnk.com",
"schema": "EMAC_CUSTOMER_CONTRACT_BENEFITS_FILE"
}

Status: Approved
Category: Protected
Authored By: Hadley on Apr 14, 2026